home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / CCFONT.H < prev    next >
C/C++ Source or Header  |  1992-03-05  |  3KB  |  56 lines

  1. /* Copyright (C) 1992 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* ccfont.h */
  21. /* Header for fonts compiled into C. */
  22.  
  23. /* Define type-specific refs for initializing arrays. */
  24. #define ref_(t) struct { struct tas_s tas; t value; }
  25. typedef struct { short len; char _ds *str; } charray;
  26. typedef struct { byte encx, charx; } charindex;
  27. #define array_v(n,p,ea)\
  28.  { {(t_array<<r_type_shift)+(ea), n}, (ref *)(p) }
  29. #define boolean_v(b) { {t_boolean<<r_type_shift}, (ushort)(b) }
  30. #define name_v(n,s)\
  31.  { {t_name<<r_type_shift, n}, s }
  32. #define null_v() { {t_null<<r_type_shift} }
  33. #define real_v(v) { {t_real<<r_type_shift}, (float)(v) }
  34. #define integer_v(i) { {t_integer<<r_type_shift}, (long)(i) }
  35. #define string_v(n,s)\
  36.  { {(t_string<<r_type_shift)+a_read+a_execute, n}, s }
  37.  
  38. /* Define the combined access masks */
  39. #define a_readonly (a_read + a_execute)
  40.  
  41. /* Support routines in iccfont.c */
  42. typedef struct {
  43.     charindex _ds *enc_keys;    /* keys from encoding vectors */
  44.     uint num_enc_keys;
  45.     char _ds * _ds *str_keys;    /* string keys */
  46.     uint num_str_keys;
  47.     uint extra_slots;        /* (need 1 extra for fonts) */
  48.     uint dict_attrs;        /* protection for dictionary */
  49.     uint value_attrs;        /* protection for values */
  50.                     /* (only used for string dicts) */
  51. } cfont_dict_keys;
  52. extern int cfont_ref_dict_create(P3(ref *, const cfont_dict_keys _ds *, const ref _ds * _ds *));
  53. extern int cfont_string_dict_create(P3(ref *, const cfont_dict_keys _ds *, const charray _ds *));
  54. extern int cfont_num_dict_create(P3(ref *, const cfont_dict_keys _ds *, const float _ds *));
  55. extern int cfont_name_array_create(P3(ref *, const char _ds * _ds *, int));
  56.